package utility;
import java.util.Vector;



public class splitStringBuffer 
{
	public static Vector<Object> conversion(StringBuffer strbuf,char ch)
	{	
		strbuf.append(ch);
		Vector<Object > temp= new Vector<Object>();
		for(int i=0;i<strbuf.length();i++)
		{
			if(strbuf.charAt(i)==ch)
			{	
				String temp1 = strbuf.substring(0, i); 
				temp.add(temp1);
				strbuf.delete(0, i+1);
				i=0;
			}	
		}
		System.out.println(temp);
		return temp;
	}
	
 public static void main(String[] args)
 	{
	 StringBuffer str=new StringBuffer("gfgjdfgjf\nfhdf\ngjfgjgj\nsdfhdsfh\nfshfh");
		char ch='\n'; ;
	  conversion(str, ch);
 	} 

}
